package com.controller;


import com.common.utils.Result;
import com.entity.Operation;
import com.service.OperationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author wty
 * @since 2021-04-19
 */
@CrossOrigin(allowCredentials = "true", allowedHeaders = "*")
@RestController
@RequestMapping("/operation")
public class OperationController {

    @Autowired
    private OperationService operationService;

    /**
     * 根据条件获取操作记录
     */
    @RequestMapping("/getOperationList")
    public Result getOperationList(@RequestBody Operation operation){

        return  operationService.getOperationList(operation);

    }

}

